// 微信公众平台

import request from '@/utils/request'
import { getPlaid } from '@/utils/auth'

export function getWechatShareList(page, size, search, plaid) {
  return request({
    url: '/platform/wechat/share',
    method: 'get',
    params: { page, size, search, plaid }
  })
}

export function getWechatShare(id) {
  return request({
    url: '/platform/wechat/share/' + id,
    method: 'get',
    params: { plaid: getPlaid() }
  })
}
// 处理分账
export function handleShare(id) {
  return request({
    url: '/platform/wechat/share/handleShare',
    method: 'post',
    params: { plaid: getPlaid() },
    data: { id }
  })
}

// 处理分账
export function shareFinish(id) {
  return request({
    url: '/platform/wechat/share/shareFinish',
    method: 'post',
    params: { plaid: getPlaid() },
    data: { id }
  })
}

